﻿using System;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

namespace MyLinksMenu.Layouts
{
	///Idea from: http://www.estruyf.be/blog/add-the-my-links-functionality-as-in-sharepoint-2007-to-your-2010-site/
	public partial class MyLinksDialogRedirect : LayoutsPageBase
	{
		private string _WebUrl;
		private string _LinkTitle;
		private string _LinkUrl;

		protected string WebUrl
		{
			get
			{
				return _WebUrl;
			}
		}

		protected string LinkTitle
		{
			get
			{
				return _LinkTitle;
			}
		}

		protected string LinkUrl
		{
			get
			{
				return _LinkUrl;
			}
		}

		protected void Page_Load(object sender, EventArgs e)
		{
			_WebUrl = SPContext.Current.Web.Url;

			if (Request["Title"] != null)
				_LinkTitle = Server.HtmlEncode(Request["Title"]);

			if (Request["Url"] != null)
				_LinkUrl = Server.HtmlEncode(Request["Url"]);
		}
	}
}
